/**
 * 
 */
package com.lehecai.core.lottery;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.lehecai.core.IntegerBeanLabelItem;

/**
 * @author Sunshow
 * 银行列表
 */
public class BankType extends IntegerBeanLabelItem {


	private static final long serialVersionUID = -530998782071935781L;

	private static final Logger logger = LoggerFactory.getLogger(BankType.class.getName());
	
	private static List<BankType> items = new ArrayList<BankType>();
	private static List<BankType> t0Items = new ArrayList<BankType>();
	private static List<BankType> t1Items = new ArrayList<BankType>();
	private static List<BankType> rechargeItems = new ArrayList<BankType>();
	
	protected BankType(String name, int value) {
		super(BankType.class.getName(), name, value);
		items.add(this);
		rechargeItems.add(this);
	}
	
	protected BankType(String name, int value, boolean flag) {
		super(BankType.class.getName(), name, value);
		rechargeItems.add(this);
	}
	
	public static BankType getItem(int value){
		try {
			return (BankType)BankType.getResult(BankType.class.getName(), value);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			return null;
		}
	}
	
	public static List<BankType> getItems() {
		return items;
	}
	
	public static List<BankType> getT0Items() {
		return t0Items;
	}
	
	public static List<BankType> getT1Items() {
		return t1Items;
	}
	
	public static List<BankType> getRechargeItems() {
		return rechargeItems;
	}
	
	public static final BankType ALL = new BankType("全部", -1);
	public static final BankType DEFAULT = new BankType("默认", 0);
	public static final BankType BC = new BankType("中国银行", 1);
	public static final BankType ICBC = new BankType("中国工商银行", 2);
	public static final BankType CMBC = new BankType("招商银行", 3);
	public static final BankType CBC = new BankType("中国建设银行", 4);
	public static final BankType BOCOM = new BankType("交通银行", 5);
	public static final BankType ABC = new BankType("中国农业银行", 6);
	public static final BankType SPD_BANK = new BankType("上海浦东发展银行", 7);
	public static final BankType CIB = new BankType("兴业银行", 8);
	//public static final BankType GDB = new BankType("广发银行股份有限公司", 9);
	public static final BankType GDB = new BankType("广东发展银行", 9);
	public static final BankType SDB = new BankType("深圳发展银行", 10);
	public static final BankType CCB = new BankType("中信银行", 11);
	public static final BankType CEB = new BankType("光大银行", 12);
	public static final BankType MBC = new BankType("民生银行", 13);
	public static final BankType HCCB = new BankType("杭州银行", 14);
	public static final BankType NBCB = new BankType("宁波银行", 15);
	public static final BankType FDBC = new BankType("富滇银行", 16);
	public static final BankType PABC = new BankType("平安银行", 17);
	public static final BankType SHBC = new BankType("上海银行", 18);
	public static final BankType BRCB = new BankType("北京农村商业银行", 19);
	public static final BankType ICBC_B2B = new BankType("中国工商银行(B2B)", 20);
	public static final BankType CBC_B2B = new BankType("中国建设银行(B2B)", 21);
	public static final BankType ABC_B2B = new BankType("中国农业银行(B2B)", 22);
	public static final BankType SPD_BANK_B2B = new BankType("上海浦东发展银行(B2B)", 23);
	public static final BankType PSBC = new BankType("中国邮政储蓄银行", 24);
	public static final BankType NCXYS = new BankType("农村信用社", 25);
	public static final BankType CZYH = new BankType("村镇银行", 26);
	public static final BankType JCC = new BankType("晋城市商业银行", 27);
	public static final BankType HKBEA = new BankType("东亚银行", 28);
	public static final BankType HSBC = new BankType("汇丰银行", 29);
	public static final BankType ADBC = new BankType("中国农业发展银行", 30);
	public static final BankType RCU = new BankType("农村合作银行", 31);
	public static final BankType NCSYYH = new BankType("农村商业银行", 32);
	public static final BankType HXB = new BankType("华夏银行", 33);
	public static final BankType HS = new BankType("徽商银行股份有限公司", 34);
	public static final BankType CHARTERED = new BankType("渣打银行", 35);
	public static final BankType CBHB = new BankType("渤海银行", 36);
	public static final BankType EG = new BankType("恒丰银行", 37);
	public static final BankType NCB = new BankType("南洋商业银行", 38);
	public static final BankType CZ = new BankType("浙商银行", 39);
	
	public static final BankType HYYH = new BankType("华一银行", 40);
	public static final BankType GJKFYH = new BankType("国家开发银行", 41);
	public static final BankType CSXYS = new BankType("城市信用社", 42);
	public static final BankType CSSYYH = new BankType("城市商业银行", 43);
	public static final BankType HSYH = new BankType("恒生银行", 44);
	public static final BankType HQYH = new BankType("花旗银行", 45);
	public static final BankType GSYH_WAP = new BankType("工商银行WAP", 46);
	public static final BankType ZSYH_WAP = new BankType("招商银行WAP", 47);
	public static final BankType JSYH_WAP = new BankType("建设银行WAP", 48);
	
	public static final BankType NJYH = new BankType("南京银行", 49);
	public static final BankType BJYH = new BankType("北京银行", 50);
	public static final BankType SXJSYH = new BankType("晋商银行", 51);
	public static final BankType WZYH = new BankType("温州银行", 52);
	public static final BankType ZJCZSYYH = new BankType("浙江稠州商业银行", 53);
	public static final BankType YDXYHZLS = new BankType("尧都信用合作联社", 54);
	public static final BankType SDNXS = new BankType("顺德农信社", 55);
	public static final BankType GZYH = new BankType("广州银行", 56);
	public static final BankType ZHNCXYHZLS = new BankType("珠海市农村信用合作联社", 57);
	public static final BankType HKYH = new BankType("汉口银行", 58);
	public static final BankType SHNCSYYH = new BankType("上海市农村商业银行", 59);
	public static final BankType GZNCXYHZS = new BankType("广州市农村信用合作社", 60);
	public static final BankType BC_RM = new BankType("中国银行(对公)", 61);
	public static final BankType CBC_RM = new BankType("建设银行(对公)", 62);
	public static final BankType CMBC_RM = new BankType("招商银行(对公)", 63);
	public static final BankType ICBC_RM = new BankType("工商银行(对公)", 64);
	public static final BankType ABC_RM = new BankType("农业银行(对公)", 65);
	
	public static final BankType PAY_BANK_BSYH = new BankType("包商银行", 66);
	public static final BankType PAY_BANK_CSYH = new BankType("长沙银行", 67);
	public static final BankType PAY_BANK_CDYH = new BankType("承德银行", 68);
	public static final BankType PAY_BANK_CDNSYH = new BankType("成都农商银行", 69);
	
	public static final BankType PAY_BANK_CQNCSYYH = new BankType("重庆农村商业银行", 70);
	public static final BankType PAY_BANK_CQYH = new BankType("重庆银行", 71);
	public static final BankType PAY_BANK_DLYH = new BankType("大连银行", 72);
	public static final BankType PAY_BANK_DYSSYYH = new BankType("东营市商业银行", 73);
	public static final BankType PAY_BANK_ERDSYH = new BankType("鄂尔多斯银行", 74);
	public static final BankType PAY_BANK_FJSNCXYL = new BankType("福建省农村信用社", 75);
	public static final BankType PAY_BANK_GYYH = new BankType("贵阳银行", 76);
	public static final BankType PAY_BANK_GZNCSYYH = new BankType("广州农村商业银行", 77);
	public static final BankType PAY_BANK_HEBYH = new BankType("哈尔滨银行", 78);
	public static final BankType PAY_BANK_HNSNCXYS = new BankType("湖南省农村信用社", 79);
	
	public static final BankType PAY_BANK_HBYH = new BankType("河北银行", 80);
	public static final BankType PAY_BANK_JZYH = new BankType("锦州银行", 81);
	public static final BankType PAY_BANK_JSCSNCSYYH = new BankType("江苏常熟农村商业银行", 82);
	public static final BankType PAY_BANK_JIANGSYH = new BankType("江苏银行", 83);
	public static final BankType PAY_BANK_JYNCSYYH = new BankType("江阴农村商业银行", 84);
	public static final BankType PAY_BANK_JJYH = new BankType("九江银行", 85);
	public static final BankType PAY_BANK_LZYH = new BankType("兰州银行", 86);
	public static final BankType PAY_BANK_LJYH = new BankType("龙江银行", 87);
	public static final BankType PAY_BANK_NCXY = new BankType("南昌银行", 88);
	public static final BankType PAY_BANK_QHYH = new BankType("青海银行", 89);

	public static final BankType PAY_BANK_QLYH = new BankType("齐鲁银行", 90);
	public static final BankType PAY_BANK_SRYH = new BankType("上饶银行", 91);
	public static final BankType PAY_BANK_SDNCYH = new BankType("顺德农村商业银行", 92);
	public static final BankType PAY_BANK_TGYH = new BankType("台州银行", 93);
	public static final BankType PAY_BANK_WHSSYYH = new BankType("威海市商业银行", 94);
	public static final BankType PAY_BANK_WFYH = new BankType("潍坊银行", 95);
	public static final BankType PAY_BANK_WLMQSYYH = new BankType("乌鲁木齐商业银行", 97);
	public static final BankType PAY_BANK_WXNCSYYH = new BankType("无锡农村商业银行", 98);
	public static final BankType PAY_BANK_YCSSYYH = new BankType("宜昌市商业银行", 99);
	
	public static final BankType PAY_BANK_NBJZYH = new BankType("鄞州银行", 100);
	public static final BankType PAY_BANK_WJNCSYYH = new BankType("吴江农村商业银行", 101);
	public static final BankType PAY_BANK_YDNCSYYH = new BankType("尧都农村商业银行", 102);
	public static final BankType PAY_BANK_YINCSSYYH = new BankType("银川市商业银行", 103);
	public static final BankType PAY_BANK_ZJTLSYYH = new BankType("浙江泰隆商业银行", 104);
	public static final BankType PAY_BANK_ZJMTSYYH = new BankType("浙江民泰商业银行", 105);
	public static final BankType PAY_BANK_WHT = new BankType("网汇通", 106);
    public static final BankType PAY_BANK_SDDYYH = new BankType("东营银行", 107);
    public static final BankType PAY_BANK_ZZYH = new BankType("郑州银行", 108);
	
	public static final BankType RETURN_TICKET = new BankType("退票充值", 50000, false);
	public static final BankType OTHER = new BankType("其他", 50001, false);
	
	static {
		for (BankType bankType : items) {
			if (bankType.getValue() == BankType.ICBC.getValue() ||
					bankType.getValue() == BankType.CMBC.getValue()	||
					bankType.getValue() == BankType.CBC.getValue()	||
					bankType.getValue() == BankType.ABC.getValue()) {
				t0Items.add(bankType);
			} else {
				t1Items.add(bankType);
			}
		}
	}
}
